package com.zxmc.server.service;

import com.zxmc.common.result.PageResult;
import com.zxmc.pojo.dto.NovelDto;
import com.zxmc.pojo.dto.NovelQueryDto;
import com.zxmc.pojo.dto.NovelRecommend;
import com.zxmc.pojo.dto.PageNovelQueryDto;
import com.zxmc.pojo.entity.Novel;
import com.zxmc.pojo.vo.NovelVO;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;

public interface NovelService {
    List<NovelVO> getNovelVOs(PageNovelQueryDto pageNovelQueryDto, List<Novel> novels, NovelTypeService novelTypeService);

    void insert(NovelDto novelDto);

    List<Novel> list(NovelQueryDto novelQueryDto);

    PageResult page(PageNovelQueryDto pageNovelQueryDto);

    void update(Novel novel);

    void updateCover(Novel novel);

    List<NovelRecommend> listRecommend();

    void delete(Integer id);

    List<Integer> listAllIds();

    List<Novel> listByAuthor(String author);

    void crawlerById(Integer id);

    void crawlerByUrl(String url);

    Novel listById(Integer id);
}
